<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex flex-wrap align-center justify-between benben-position-layout flex couponMy_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center couponMy_fd0_0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <image class='couponMy_fd0_0_c0'  mode="aspectFit"  :src='STATIC_URL+"39.png"'></image>
</view>
<text class='couponMy_fd0_1'  >我的优惠券</text>
    <view   class='flex flex-wrap align-center couponMy_fd0_0'      >
        </view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction align-stretch benben-flex-layout"    >
        <view>
        <benben-flex-tabs class-name='couponMy_benbenTabsfd1_0'  v-model="tabs" ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='true' :top='0' :is-show-content='false' :scrollspy='false'  :tabs-info.sync="tabsInfofd1_0" @change="getListFunc()" >
            
                    <scroll-view
          @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft"
          id="benben_tabsfd1_0"
          class="benben-tabs"
          style="width:750rpx"
          :scroll-x="true"
          :scroll-left.sync="tabsInfofd1_0.moveX"
          scroll-with-animation="all .3s ease"
        >
          <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
            <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex flex align-center justify-around">
                        <view 
                :class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center': true }"
                @tap="tabs = '1'"
                :id="`benben_tabsfd1_0-title-item-${'1'}`"
                
                
              >
                
<text   >全部</text>

              </view>            <view 
                :class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }"
                @tap="tabs = '2'"
                :id="`benben_tabsfd1_0-title-item-${'2'}`"
                
                
              >
                
<text   >未使用</text>

              </view>            <view 
                :class="{ 'checkTitlefd1_0': tabs == '4', 'flex flex-wrap align-center': true }"
                @tap="tabs = '4'"
                :id="`benben_tabsfd1_0-title-item-${'4'}`"
                
                
              >
                
<text   >已过期</text>

              </view>
            </view>
            <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}" id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line couponMy_linefd1_0"></view>
          </view>
        </scroll-view>
            
        </benben-flex-tabs>
        
</view>
    <template v-for = '(item,key0) in dataList'>
    <view   class='flex flex-direction align-stretch couponMy_bodyfd1_0_c3'       :key='key0'>
            <view   class='flex flex-direction flex-wrap align-stretch couponMy_fd1_1_c0'    v-if= "item.status=='1'"  >
            <view   class='flex flex-wrap align-center couponMy_fd1_1_c0_c0'      >
        <image class='couponMy_fd1_1_c0_c0_c0'  mode="aspectFit"  :src='STATIC_URL+"41.png"'></image>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub couponMy_fd1_1_c0_c0_c1'      >
            <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c0_c0_c1_c0_c0'  >{{item.coupon_name}}</text>
</view>
    <view   class='flex align-center couponMy_fd1_1_c0_c0_c1_c1'      >
        <text class='couponMy_fd1_1_c0_c0_c1_c1_c0'  >有效期至：</text>
<text class='couponMy_fd1_1_c0_c0_c1_c1_c0'  >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c0_c0_c2_c0'  >￥</text>
<text class=' couponMy_fd1_1_c0_c0_c2_c1'   >
    <text class=' couponMy_price1_fd1_1_c0_c0_c2_c1' >{{ item.money | frontPrice }}</text>
    <text class=' couponMy_price2_fd1_1_c0_c0_c2_c1' >{{ item.money | laterPrice }}</text>
</text>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-between couponMy_fd1_1_c0_c1'      >
        <text class='couponMy_fd1_1_c0_c1_c0'  >{{item.content}}</text>
<button class='couponMy_fd1_1_c0_c1_c1'    >去使用</button>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch couponMy_fd1_1_c1'    v-if= "item.status=='3'"  >
            <view   class='flex flex-wrap align-center couponMy_fd1_1_c0_c0'      >
        <image class='couponMy_fd1_1_c0_c0_c0'  mode="aspectFit"  :src='STATIC_URL+"43.png"'></image>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub couponMy_fd1_1_c0_c0_c1'      >
            <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c0_c0'  >{{item.coupon_name}}</text>
</view>
    <view   class='flex align-center couponMy_fd1_1_c0_c0_c1_c1'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >有效期至：</text>
<text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c1_c0_c2_c0'  >￥</text>
<text class=' couponMy_fd1_1_c1_c0_c2_c1'   >
    <text class=' couponMy_price1_fd1_1_c0_c0_c2_c1' >{{ item.money | frontPrice }}</text>
    <text class=' couponMy_price2_fd1_1_c0_c0_c2_c1' >{{ item.money | laterPrice }}</text>
</text>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-between couponMy_fd1_1_c0_c1'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >{{item.content}}</text>
<button class='couponMy_fd1_1_c1_c1_c1'   >已使用</button>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch couponMy_fd1_1_c2'    v-if= "item.status=='4'"  >
            <view   class='flex flex-wrap align-center couponMy_fd1_1_c0_c0'      >
        <image class='couponMy_fd1_1_c0_c0_c0'  mode="aspectFit"  :src='STATIC_URL+"43.png"'></image>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub couponMy_fd1_1_c0_c0_c1'      >
            <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c0_c0'  >{{item.coupon_name}}</text>
</view>
    <view   class='flex align-center couponMy_fd1_1_c0_c0_c1_c1'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >有效期至：</text>
<text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='couponMy_fd1_1_c1_c0_c2_c0'  >￥</text>
<text class=' couponMy_fd1_1_c1_c0_c2_c1'   >
    <text class=' couponMy_price1_fd1_1_c0_c0_c2_c1' >{{ item.money | frontPrice }}</text>
    <text class=' couponMy_price2_fd1_1_c0_c0_c2_c1' >{{ item.money | laterPrice }}</text>
</text>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-between couponMy_fd1_1_c0_c1'      >
        <text class='couponMy_fd1_1_c1_c0_c1_c1_c0'  >{{item.content}}</text>
<button class='couponMy_fd1_1_c1_c1_c1'   >已过期</button>
</view>
</view>
</view>
    </template>
    
    <view   class='flex flex-wrap align-center'      >
        <benben-empty :list-data="dataList">
<view class='flex flex-direction flex-wrap align-center couponMy_fd1_2_c0' >
<image class='couponMy_fd1_2_c0_c0'  mode="widthFix"  :src='STATIC_URL+"44.png"'></image>

</view>
</benben-empty>
</view>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        
        
        data(){
			return {"tabsInfofd1_0":{ lineleft: '', lineWidth: '', moveX: 0, scrollX: 0, PageScrollX: 0 },"tabs":"1","dataList":[]};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            this.getListFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //优惠券-我的优惠券列表
                async getListFunc(){
                        //请求方法
    //数据验证
    
  let datadataList = await this.$api.post(global.apiUrls.post64198610a95ca, {
    type:this.tabs
  });
  
  if (datadataList.data.code != 1) {
    this.$message.info(datadataList.data.msg);
    return
  } 
  let infodataList = datadataList.data;
  this.dataList = infodataList.data
  
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#F8F8F8;background-size: 100% auto;
        }
    .couponMy_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .couponMy_fd0_1{
        color:#333333;font-size:36rpx;font-weight:500;line-height:50rpx;
    }
    .couponMy_fd0_0_c0{
        width:20rpx;height:36rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 0rpx 0rpx 32rpx;
    }
    .couponMy_fd0_0{
        width:100rpx;height:88rpx;
    }
    .couponMy_fd1_2_c0_c0{
        width:400rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_fd1_2_c0{
        width:100%;padding:50rpx 0rpx 50rpx 0rpx;
    }
    .couponMy_fd1_1_c2{
        background:url(image-path('42.png')) no-repeat ,transparent;background-size:100% auto !important;padding:30rpx 31rpx 30rpx 34rpx;margin:24rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_fd1_1_c1_c1_c1{
        background:rgba(171, 177, 196, 1);border-radius:24rpx 24rpx 24rpx 24rpx;font-size:24rpx;color:#fff;width:120rpx;height:48rpx;line-height:48rpx;
    }
    .couponMy_fd1_1_c1_c0_c2_c1{
        color:rgba(171, 177, 196, 1);font-weight:600;
    }
    .couponMy_fd1_1_c1_c0_c2_c0{
        color:rgba(171, 177, 196, 1);font-size:33rpx;font-weight:700;line-height:40rpx;
    }
    .couponMy_fd1_1_c1_c0_c1_c1_c0{
        color:rgba(171, 177, 196, 1);font-size:24rpx;font-weight:400;line-height:33rpx;
    }
    .couponMy_fd1_1_c1_c0_c1_c0_c0{
        color:rgba(171, 177, 196, 1);font-size:32rpx;font-weight:500;line-height:45rpx;
    }
    .couponMy_fd1_1_c1{
        background:url(image-path('42.png')) no-repeat ,transparent;background-size:100% 100% !important;padding:30rpx 31rpx 30rpx 34rpx;margin:24rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_fd1_1_c0_c1_c1{
        background:linear-gradient(180deg, #FFA095 0%, #FD513D 100%);border-radius:24rpx 24rpx 24rpx 24rpx;font-size:24rpx;color:#fff;width:120rpx;height:48rpx;line-height:48rpx;
    }
    .couponMy_fd1_1_c0_c1_c0{
        color:#333333;font-size:24rpx;font-weight:400;line-height:33rpx;
    }
    .couponMy_fd1_1_c0_c1{
        margin:20rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_price2_fd1_1_c0_c0_c2_c1{
        font-size:33rpx;
    }
    .couponMy_price1_fd1_1_c0_c0_c2_c1{
        font-size:49rpx;
    }
    .couponMy_fd1_1_c0_c0_c2_c1{
        color:rgba(240, 35, 37, 1);font-weight:600;
    }
    .couponMy_fd1_1_c0_c0_c2_c0{
        color:#F02325;font-size:33rpx;font-weight:700;line-height:40rpx;
    }
    .couponMy_fd1_1_c0_c0_c1_c1_c0{
        color:#999999;font-size:24rpx;font-weight:400;line-height:33rpx;
    }
    .couponMy_fd1_1_c0_c0_c1_c1{
        margin:8rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_fd1_1_c0_c0_c1_c0_c0{
        color:#333333;font-size:32rpx;font-weight:500;line-height:45rpx;
    }
    .couponMy_fd1_1_c0_c0_c1{
        margin:0rpx 0rpx 0rpx 16rpx;
    }
    .couponMy_fd1_1_c0_c0_c0{
        width:122rpx;height:100rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_fd1_1_c0_c0{
        border-bottom:1px dashed rgba(221, 221, 221, 1);padding:0rpx 0rpx 14rpx 0rpx;
    }
    .couponMy_fd1_1_c0{
        background:url(image-path('40.png')) no-repeat ,transparent;background-size:100% 100% !important;padding:30rpx 31rpx 30rpx 34rpx;margin:24rpx 0rpx 0rpx 0rpx;
    }
    .couponMy_bodyfd1_0_c3{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .couponMy_linefd1_0{
        background:var(--benbenbgColor7);width:40rpx;height:6rpx;top:80rpx;background-size:100% auto !important;border-radius:16rpx;
    }
    .checkTitlefd1_0{
        font-weight:700 !important;font-size:32rpx !important;color:#F0C791 !important;background-color:rgba(255, 255, 255, 1) !important;
    }
    ::v-deep .couponMy_benbenTabsfd1_0{
        background:#fff;width:750rpx;height:90rpx;white-space:nowrap;text-align:center;font-size:32rpx;font-weight:400;color:var(--benbenFontColor1);
    }
</style>